xen: Fix Clang -Wunicode diagnostic when building asm-macros
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 3 Mar 2023 07:01:21 +0000 (08:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Mar 2023 07:01:21 +0000 (08:01 +0100)
commitb10cf1561a638c835481ae923b571cb8f7350a89
treef451b8af7b2741c91c8deb9576998c9d8cde8d1f
parent837bdc6eb2df796e832302347f363afc820694fe
xen: Fix Clang -Wunicode diagnostic when building asm-macros

While trying to work around a different Clang-IAS bug (parent changeset), I
stumbled onto:

  In file included from arch/x86/asm-macros.c:3:
  ./arch/x86/include/asm/spec_ctrl_asm.h:144:19: error: \u used with
  no following hex digits; treating as '\' followed by identifier [-Werror,-Wunicode]
  .L\@_fill_rsb_loop\uniq:
                    ^

It turns out that Clang -E is sensitive to the file extension of the source
file it is processing.  Furthermore, C explicitly permits the use of \u
escapes in identifier names, so the diagnostic would be reasonable in
principle if we trying to compile the result.

asm-macros should really have been .S from the outset, as it is ultimately
generating assembly, not C.  Rename it, which causes Clang not to complain.

We need to introduce rules for generating a .i file from .S, and substituting
c_flags for a_flags lets us drop the now-redundant -D__ASSEMBLY__.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 53f0d02040b1df08f0589f162790ca376e1c2040
master date: 2023-02-24 17:44:29 +0000
xen/Rules.mk
xen/arch/x86/Makefile
xen/arch/x86/asm-macros.S [new file with mode: 0644]
xen/arch/x86/asm-macros.c [deleted file]